package graphic;

import javax.swing.*;
import java.awt.*;

/**
 * @program: javaLearn
 * @description:
 * @author: renhai
 * @Date ：2021/12/21 0:01
 **/
public class MyEvent1 extends JFrame {
    public MyEvent1() {
        super("事件处理机制");
        this.setBounds(400, 400, 400, 400);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        Container c = this.getContentPane();    //框架的内容窗格作为事件源
        c.addMouseListener(new MyMouseListener2(c)); //注册监听器,业主与装修公司签约,装修公司要注明为谁装修,你加我为好友,我加你为好友.
        this.setVisible(true);

    }

    public static void main(String[] args) {
        new MyEvent1();
    }

}
